/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author kenny
 */
@Entity
@Table(name = "salon")
@NamedQueries({
    @NamedQuery(name = "Salon.findAll", query = "SELECT s FROM Salon s"),
    @NamedQuery(name = "Salon.findByNSlnId", query = "SELECT s FROM Salon s WHERE s.nSlnId = :nSlnId"),
    @NamedQuery(name = "Salon.findByVNombre", query = "SELECT s FROM Salon s WHERE s.vNombre = :vNombre"),
    @NamedQuery(name = "Salon.findByNPiso", query = "SELECT s FROM Salon s WHERE s.nPiso = :nPiso"),
    @NamedQuery(name = "Salon.findByNCapacidad", query = "SELECT s FROM Salon s WHERE s.nCapacidad = :nCapacidad"),
    @NamedQuery(name = "Salon.findByVEstado", query = "SELECT s FROM Salon s WHERE s.vEstado = :vEstado")})
public class Salon implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "nSlnId")
    private Integer nSlnId;
    @Column(name = "vNombre")
    private String vNombre;
    @Column(name = "nPiso")
    private Integer nPiso;
    @Column(name = "nCapacidad")
    private Integer nCapacidad;
    @Column(name = "vEstado")
    private String vEstado;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "slnId")
    private List<Periodoxsalon> periodoxsalonList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "salon")
    private List<Salonxmodalidaddictado> salonxmodalidaddictadoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "salon")
    private List<Clasexsalon> clasexsalonList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "salon")
    private List<Salonxperiodo> salonxperiodoList;
    
    public Salon() {
    }

    public Salon(Integer nSlnId) {
        this.nSlnId = nSlnId;
    }

    public Integer getNSlnId() {
        return nSlnId;
    }

    public void setNSlnId(Integer nSlnId) {
        this.nSlnId = nSlnId;
    }

    public String getVNombre() {
        return vNombre;
    }

    public void setVNombre(String vNombre) {
        this.vNombre = vNombre;
    }

    public Integer getNPiso() {
        return nPiso;
    }

    public void setNPiso(Integer nPiso) {
        this.nPiso = nPiso;
    }

    public Integer getNCapacidad() {
        return nCapacidad;
    }

    public void setNCapacidad(Integer nCapacidad) {
        this.nCapacidad = nCapacidad;
    }

    public String getVEstado() {
        return vEstado;
    }

    public void setVEstado(String vEstado) {
        this.vEstado = vEstado;
    }

    public List<Periodoxsalon> getPeriodoxsalonList() {
        return periodoxsalonList;
    }

    public void setPeriodoxsalonList(List<Periodoxsalon> periodoxsalonList) {
        this.periodoxsalonList = periodoxsalonList;
    }

    public List<Salonxmodalidaddictado> getSalonxmodalidaddictadoList() {
        return salonxmodalidaddictadoList;
    }

    public void setSalonxmodalidaddictadoList(List<Salonxmodalidaddictado> salonxmodalidaddictadoList) {
        this.salonxmodalidaddictadoList = salonxmodalidaddictadoList;
    }
    
    public List<Clasexsalon> getClasexsalonList() {
        return clasexsalonList;
    }

    public void setClasexsalonList(List<Clasexsalon> clasexsalonList) {
        this.clasexsalonList = clasexsalonList;
    }
    
    public List<Salonxperiodo> getSalonxperiodoList() {
        return salonxperiodoList;
    }

    public void setSalonxperiodoList(List<Salonxperiodo> salonxperiodoList) {
        this.salonxperiodoList = salonxperiodoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nSlnId != null ? nSlnId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Salon)) {
            return false;
        }
        Salon other = (Salon) object;
        if ((this.nSlnId == null && other.nSlnId != null) || (this.nSlnId != null && !this.nSlnId.equals(other.nSlnId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.Salon[ nSlnId=" + nSlnId + " ]";
    }
    
}
